//
//  UILabel + Extension.swift
//  swiftweibo
//
//  Created by 吕建发 on 16/5/16.
//  Copyright © 2016年 cn.itcast. All rights reserved.
//

import UIKit

extension UILabel {
    ///   label的便利构造函数
    ///
    ///   - parameter title:     title
    ///   - parameter font:      font
    ///   - parameter color:     color
    ///   - parameter alignment: alignment
    ///
    ///   - returns: UILabel
    convenience init(gk_title title: String,
                     font: CGFloat = 14.0,
                     color: UIColor = UIColor.darkGrayColor(),
                     alignment: NSTextAlignment = .Left) {
        
        self.init()
        
        self.font = UIFont.systemFontOfSize(font)
        self.text = title
        self.textColor = color
        self.textAlignment = alignment
        
        self.numberOfLines = 0
        
        sizeToFit()
    }
    
    
    
}
